package com.bnz.service.impl;

import com.bnz.entity.Users;
import com.bnz.mapper.UsersMapper;
import com.bnz.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service // 注入到spring容器中
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersMapper usersMapper;

    // 1、查询所有的用户
    @Override
    public List<Users> findAll() {
        return usersMapper.selectAll();
    }
}
